﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Feedback.aspx.cs" Inherits="Ajax.Web.Feedback" %>

<%@ Register Src="~/Control/Top.ascx" TagName="top" TagPrefix="AjaxControl" %>
<%@ Register Src="~/Control/Footer.ascx" TagName="footer" TagPrefix="AjaxControl" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>在线留言 -
        <%=webset.WebName %></title>
    <%=AddMetaInfo(webset.WebKeywords,webset.WebDescription,"") %>
    <link type="text/css" rel="stylesheet" href="Css/style.css" />
    <link type="text/css" rel="stylesheet" href="css/pagination.css" />
    <link href="Images/library/msg.css" rel="stylesheet" type="text/css" />
    <link href="css/custom-theme/jquery-ui-1.7.2.custom.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="Js/jquery-1.3.2.min.js"></script>

    <script type="text/javascript" src="Js/jquery-ui-1.7.2.custom.min.js"></script>

    <script type="text/javascript" src="js/jquery.pagination.js"></script>

    <script type="text/javascript" src="Js/jquery.validate.min.js"></script>

    <script type="text/javascript" src="Js/messages_cn.js"></script>

    <script type="text/javascript" src="Images/library/msg.js"></script>

    <script type="text/javascript" src="Images/library/focus.js"></script>

    <script type="text/javascript">
    $(function() {
        //分页参数设置
        $("#Pagination").pagination(<%=pcount %>, {
        callback: pageselectCallback,
        prev_text: "« 上一页",
        next_text: "下一页 »",
        items_per_page:<%=pagesize %>,
        num_display_entries:3,
        current_page:<%=page %>,
        num_edge_entries:2,
        link_to:"?page=__id__"
        });
    });
    function pageselectCallback(page_id, jq) {
        //alert(page_id); 回调函数，进一步使用请参阅说明文档
    }
    $(function() {
        //表单验证JS
        $("#form1").validate({
            //出错时添加的标签
            errorElement: "span",
            success: function(label) {
                //正确时的样式
                label.text(" ").addClass("success");
            }
        });

        //切换验证码
        $(".VerifyCode").bind("click", function() {
            $(".VerifyCode img").attr("src", "/Tools/VerifyCodeImage.ashx?time=" + Math.random());
        });
    });
    </script>

</head>
<body id="feedback">
    <form id="form1" runat="server">
    <!--Head.Start-->
    <AjaxControl:top ID="topControls" runat="server" />
    <!--Head.End-->
    <div class="main">
        <!--left.start-->
        <div class="pleft">
            <dl class="p1">
                <dt><strong>栏目导航</strong></dt>
                <dd>
                    <ul class="b1">
                        <%=Ajax.Web.UI.Contents.ViewTxtList(0, 20, "ClassId=7", "SortId asc", "Company")%>
                    </ul>
                </dd>
            </dl>
            <dl class="p1 mtop">
                <dt><strong>热点新闻</strong></dt>
                <dd>
                    <ul class="b2">
                        <%=Ajax.Web.UI.Article.ViewTxtList(8, 30, 0, "", "IsHot=1 and IsLock=0", "AddTime desc")%>
                    </ul>
                </dd>
            </dl>
        </div>
        <!--left.end-->
        <!--right.start-->
        <div class="pright">
            <div class="prplace">
                <a href="index.html">主页</a> &gt; 留言建议 &gt;
            </div>
            <div class="pageInfo">
                <div class="listMsg">
                    <asp:Repeater ID="rptList" runat="server">
                        <ItemTemplate>
                            <dl>
                                <dt><span>发表时间：<%#Eval("AddTime").ToString()%></span><b><%#Eval("UserName").ToString()%>：</b><%#Eval("Title").ToString()%></dt>
                                <dd>
                                    <%#Eval("Content").ToString()%>
                                    <%#Eval("ReContent").ToString() != "" ? "<div class=\"reply\">\n<h3><span>" + Eval("ReTime").ToString() + "</span>管理员答复：</h3>" + Eval("ReContent").ToString() + "</div>\n" : ""%>
                                </dd>
                            </dl>
                        </ItemTemplate>
                    </asp:Repeater>
                    <div class="pagebox">
                        <div id="Pagination" class="flickr right">
                        </div>
                    </div>
                </div>
                <div class="line10">
                </div>
                <div class="addMsg">
                    <h2>
                        发表留言</h2>
                    <table cellpadding="0" cellspacing="0" border="0" width="100%" class="questionTable">
                        <tr>
                            <td width="15%" align="right">
                                你的姓名 *
                            </td>
                            <td width="85%">
                                <asp:TextBox ID="txtUserName" runat="server" Style="width: 200px;" CssClass="input required"
                                    MaxLength="50" minlength="2" HintTitle="联系人姓名" HintInfo="请务必填写你的姓名或称呼，少于50个字符。"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                联系电话 *
                            </td>
                            <td>
                                <asp:TextBox ID="txtUserTel" runat="server" Style="width: 200px;" CssClass="input"
                                    MaxLength="50" minlength="2" HintTitle="联系人电话号码" HintInfo="请填写联系人电话号码，少于50个字符。"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                在线QQ：*
                            </td>
                            <td>
                                <asp:TextBox ID="txtUserQQ" runat="server" Style="width: 200px;" CssClass="input"
                                    MaxLength="50" minlength="2" HintTitle="在线QQ号码或E-Mail地址" HintInfo="请填写联系人QQ号码或电子邮件地址，少于50个字符。"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                留言标题 *
                            </td>
                            <td>
                                <asp:TextBox ID="txtTitle" runat="server" Style="width: 400px;" CssClass="input required"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                留言内容 *
                            </td>
                            <td>
                                <asp:TextBox ID="txtContent" runat="server" Style="width: 400px; height: 100px;"
                                    TextMode="MultiLine" CssClass="textarea required"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                验证码 *
                            </td>
                            <td>
                                <asp:TextBox ID="txtCode" runat="server" Style="width: 50px;" CssClass="required input"></asp:TextBox>
                                <a class="VerifyCode" href="javascript:void(0);">
                                    <img src="/Tools/VerifyCodeImage.ashx" width="80" height="22" alt="点击切换验证码" style="vertical-align: middle;" />
                                    切换验证码</a>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                            <td>
                                <asp:Button ID="btnSend" runat="server" Text="提交留言" OnClick="btnSend_Click" CssClass="submit" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        <!--right.end-->
    </div>
    <!--footer Start-->
    <AjaxControl:footer ID="Footer" runat="server" />
    <!--footer End-->
    </form>
</body>
</html>
